/*
 * Copyright (C) 2004, Velocityme Partnership
 * GroupValueActionForm.java
 *
 * Created on 09 October 2004, 12:21
 */

package com.velocityme.www.actionforms.nodeactionforms;

import com.velocityme.interfaces.UserPK;
import com.velocityme.valueobjects.UserValue;
import java.util.*;
import org.apache.struts.action.*;

/**
 *
 * @author  Robert
 */
public class GroupValueActionForm extends NodeValueActionForm {
    
    private Integer[] m_unassignedUserIds;
    private Integer[] m_assignedUserIds;
    
    /** Creates a new instance of GroupValueActionForm */
    public GroupValueActionForm() {
    }
    
    public void reset(ActionMapping mapping, javax.servlet.http.HttpServletRequest request) {
        m_assignedUserIds = new Integer[0];
    }
    
    public Integer[] getUnassignedUserIds() {
        return m_unassignedUserIds;
    }
    
    public void setUnassignedUserIds(Integer[] unassignedUserIds) {
        m_unassignedUserIds = unassignedUserIds;
    }
    
    public Integer[] getAssignedUserIds() {
        return m_assignedUserIds;
    }
    
    public void setAssignedUserIds(Integer[] assignedUserIds) {
        m_assignedUserIds = assignedUserIds;
    }
    
    public Collection getAssignedUserPKs() {
        Collection userPKs = new ArrayList();
        for (int i = 0; i < m_assignedUserIds.length; i++) {
            userPKs.add(new UserPK(m_assignedUserIds[i]));
        }
        return userPKs;
    }
    
}
